package com.jastar.android.game.richman.logic.Event;

import com.jastar.android.game.richman.GameActivity;
import com.jastar.android.game.richman.logic.bean.Cell;
import com.jastar.android.game.richman.logic.bean.Player;
import com.jastar.android.game.richman.logic.enums.CellType;
import com.jastar.android.game.richman.logic.weight.WeightAble;

import java.text.MessageFormat;

public abstract class Event extends WeightAble {

    public String message;

    public Event(String message, int weight) {
        super(weight);
        this.message = message;
    }

    public abstract void hand(GameActivity activity, Cell cell, Player p, CellType.Callback callback);

    protected String format(String pattern, Object... arguments) {
        return MessageFormat.format(pattern, arguments);
    }

}
